package cc.mcggdd.leah.boot.stock.service;

import cc.mcggdd.leah.boot.stock.model.entity.StockTrading;
import cc.mcggdd.leah.boot.stock.model.form.StockTradingForm;
import cc.mcggdd.leah.boot.stock.model.query.StockTradingQuery;
import cc.mcggdd.leah.boot.stock.model.vo.StockTradingVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 交易明细服务类
 *
 * @author 
 * @since 2025-02-13 10:16
 */
public interface StockTradingService extends IService<StockTrading> {

    /**
     *交易明细分页列表
     *
     * @return
     */
    IPage<StockTradingVO> getStockTradingPage(StockTradingQuery queryParams);

    /**
     * 获取交易明细表单数据
     *
     * @param id 交易明细ID
     * @return
     */
     StockTradingForm getStockTradingFormData(Long id);

    /**
     * 新增交易明细
     *
     * @param formData 交易明细表单对象
     * @return
     */
    boolean saveStockTrading(StockTradingForm formData);

    /**
     * 修改交易明细
     *
     * @param id   交易明细ID
     * @param formData 交易明细表单对象
     * @return
     */
    boolean updateStockTrading(Long id, StockTradingForm formData);

    /**
     * 删除交易明细
     *
     * @param ids 交易明细ID，多个以英文逗号(,)分割
     * @return
     */
    boolean deleteStockTradings(String ids);

    Long getCountByHoldingId(Long holdingId);

    List<StockTradingVO> selectStockTradingListByHoldingId(Long holdingId);
}
